package com.cryrabbit.yyystitp.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by CryRabbit on 2016/11/7.
 */

public class Tiezi implements Parcelable {
    private int id;
    private String user;
    private String content;
    private String name;
    private String time;
    private String uid;
    private String city;
    private String kind;
    private String pay;
    private String length;
    public Tiezi(){
        user="my name is dd";
        content="i am contenti am contenti am contenti am contenti am contenti am contenti am contenti am content" +
                "i am contenti am contenti am contenti am content" +
                "i am contenti am contenti am contenti am contenti am content" +
                "i am contenti am contenti am contenti am content" +
                "i am contenti am contenti am content";
        name="dd";
        time="201704191952";
        pay="10000/month";
        length="6month";
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public String getPay() {
        return pay;
    }

    public void setPay(String pay) {
        this.pay = pay;
    }

    public String getLength() {
        return length;
    }

    public void setLength(String length) {
        this.length = length;
    }

    @Override
    public String toString() {
        return user+":"+name+":"+content+":"+time+":"+uid+":";
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {

        dest.writeInt(id);
        dest.writeString(user);
        dest.writeString(content);
        dest.writeString(name);
        dest.writeString(time);
        dest.writeString(uid);
        dest.writeString(city);
        dest.writeString(kind);
        dest.writeString(pay);
        dest.writeString(length);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Tiezi> CREATOR = new Creator<Tiezi>()
    {
        public Tiezi createFromParcel(Parcel in)
        {
            Tiezi tiezi=new Tiezi();
            tiezi.setId(in.readInt());
            tiezi.setUser(in.readString());
            tiezi.setContent(in.readString());
            tiezi.setName(in.readString());
            tiezi.setTime(in.readString());
            tiezi.setUid(in.readString());
            tiezi.setCity(in.readString());
            tiezi.setKind(in.readString());
            tiezi.setPay(in.readString());
            tiezi.setLength(in.readString());
            return tiezi;
        }

        public Tiezi[] newArray(int size)
        {
            return new Tiezi[size];
        }
    };
}
